home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / patch / WHDIGamesU-Z.lzh / WWFEuropeanRampage.lha / WWFEuropeanRampageHD / Install next >
Text File  |  2001-06-18  |  4KB  |  202 lines

  1. ;****************************
  2.  
  3. (set #readme-file "ReadMe")        ;name of readme file
  4. (set #docs-file "Instructions")        ;name of docs file
  5. (set #cleanup "")            ;files to delete after install
  6. (set #last-file "Disk.2")        ;last file the imager should create
  7.  
  8. ;****************************
  9. ;----------------------------
  10. ; checks if given program is installed, if not abort install
  11. ; #program - to check
  12.  
  13. (procedure P_ChkRun
  14.   (if
  15.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  16.     ("")
  17.     (abort
  18.       (cat
  19.     "You must install \"" #program "\" first!\n"
  20.     "It must be accessible via the path.\n"
  21.     "You can find it in the WHDLoad package."
  22.       )
  23.     )
  24.   )
  25. )
  26.  
  27. ;****************************
  28.  
  29. (if
  30.   (exists #readme-file)
  31.   (if
  32.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  33.     ("")
  34.     (run ("SYS:Utilities/More %s" #readme-file))
  35.   )
  36. )
  37.  
  38. (set #program "WHDLoad")
  39. (P_ChkRun)
  40.  
  41. (set #program "RawDIC")
  42. (P_ChkRun)
  43.  
  44. (if
  45.   (= @user-level 2)
  46.   (
  47.     (set #CI_drive
  48.       (askchoice
  49.     (prompt "Select source drive for diskimages")
  50.     (default 0)
  51.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  52.     (help @askchoice-help)
  53.       )
  54.     )
  55.     (select #CI_drive
  56.       (set #CI_drive "DF0:")
  57.       (set #CI_drive "DF1:")
  58.       (set #CI_drive "DF2:")
  59.       (set #CI_drive "DF3:")
  60.     )
  61.     (set #ignore " IGNOREERRORS")
  62.   )
  63.   (set #CI_drive "DF0:")
  64.   (set #ignore "")
  65. )
  66.  
  67. (set @default-dest
  68.   (askdir
  69.     (prompt ("Where should \"%s\" be installed?\nA drawer \"%s\" will be automatically created." @app-name @app-name))
  70.     (help @askdir-help)
  71.     (default @default-dest)
  72.     (disk)
  73.   )
  74. )
  75. (set #dest (tackon @default-dest @app-name))
  76. (if
  77.   (exists #dest)
  78.   (
  79.     (set #choice
  80.       (askbool
  81.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted?" #dest))
  82.         (default 1)
  83.         (choices "Delete" "Skip")
  84.         (help @askbool-help)
  85.       )
  86.     )
  87.     (if
  88.       (= #choice 1)
  89.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  90.     )
  91.   )
  92. )
  93. (makedir #dest
  94.   (help @makedir-help)
  95.   (infos)
  96. )
  97.  
  98. ;----------------------------
  99.  
  100. (if
  101.   (exists ("%s.newicon" @app-name))
  102.   (set #icon
  103.     (askchoice
  104.       (prompt "\nWhich icon would you like to install?\n")
  105.       (default 0)
  106.       (choices "Normal" "NewIcon" "Exotic NewIcon" "GlowIcon" "Exotic GlowIcon")
  107.       (help @askchoice-help)
  108.     )
  109.   )
  110.   (set #icon 0)
  111. )
  112. (select #icon
  113.   (set #icon ("%s.inf" @app-name))
  114.   (set #icon ("%s.newicon" @app-name))
  115.   (set #icon ("%s.enewicon" @app-name))
  116.   (set #icon ("%s.glowicon" @app-name))
  117.   (set #icon ("%s.exoticon" @app-name))
  118. )
  119. (copyfiles
  120.   (help @copyfiles-help)
  121.   (source #icon)
  122.   (newname ("%s.info" @app-name))
  123.   (dest #dest)
  124. )
  125. (tooltype
  126.   (dest (tackon #dest @app-name))
  127.   (settooltype "Slave" ("%s.Slave" @app-name))
  128.   (setdefaulttool "WHDLoad")
  129.   (setstack 10240)
  130.   (noposition)
  131. )
  132. (copyfiles
  133.   (help @copyfiles-help)
  134.   (source ("%s.Slave" @app-name ))
  135.   (dest #dest)
  136. )
  137. (if
  138.   (exists #readme-file)
  139.   (copyfiles
  140.     (help @copyfiles-help)
  141.     (source #readme-file)
  142.     (dest #dest)
  143.   )
  144. )
  145. (if
  146.   (exists ("%s.info" #readme-file))
  147.   (
  148.     (copyfiles
  149.       (help @copyfiles-help)
  150.       (source ("%s.info" #readme-file))
  151.       (dest #dest)
  152.     )
  153.     (tooltype
  154.       (dest (tackon #dest #readme-file))
  155.       (noposition)
  156.     )
  157.   )
  158. )
  159. (if
  160.   (exists #docs-file)
  161.   (copyfiles
  162.     (help @copyfiles-help)
  163.     (source #docs-file)
  164.     (dest #dest)
  165.   )
  166. )
  167. (if
  168.   (exists ("%s.info" #docs-file))
  169.   (
  170.     (copyfiles
  171.       (help @copyfiles-help)
  172.       (source ("%s.info" #docs-file))
  173.       (dest #dest)
  174.     )
  175.     (tooltype
  176.       (dest (tackon #dest #docs-file))
  177.       (noposition)
  178.     )
  179.   )
  180. )
  181.  
  182. (copyfiles
  183.   (help @copyfiles-help)
  184.   (source ("%s.islave" @app-name))
  185.   (dest #dest)
  186. )
  187.  
  188. (working)
  189. (run ("CD \"%s\"\nRawDIC SLAVE=%s.islave SOURCE=%s%s\nDelete %s.islave" #dest @app-name #CI_drive #ignore @app-name))
  190.  
  191. (if
  192.   (exists (tackon #dest #last-file))
  193.   ("")
  194.   (abort "Diskimaging was not successful!\nRawDIC was unable to create all needed files!")
  195. )
  196.  
  197. ;----------------------------
  198.  
  199. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  200.  
  201. (exit)
  202.